package com.client.qiuqiu;

import android.app.Application;


import java.io.File;
import java.net.Socket;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class User extends Application {
    public String serverIP;
    private String id;
    private String name;
    private Socket socket;
    private Socket msgSocket;
    private Socket fileSocket;
    private File cryptoFile;
    private File downloadFile;
    /***
     * 将消息列表按好友ID分
     * 并放在对应Map中
     */
    private Map<String, List<Chatmessage>> chatMessagesBox = new ConcurrentHashMap<>();

    public Map<String, List<Chatmessage>> getChatMessagesBox() {
        return chatMessagesBox;
    }

    public void setMsgSocket(Socket msgSocket) {
        this.msgSocket = msgSocket;
    }

    public void setFileSocket(Socket fileSocket) {
        this.fileSocket = fileSocket;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setSocket(Socket socket) {
        this.socket = socket;
    }

    public String getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public Socket getMsgSocket() {
        return msgSocket;
    }

    public Socket getFileSocket() {
        return fileSocket;
    }

    public Socket getSocket() {
        return socket;
    }

    public File getCryptoFile() {
        return cryptoFile;
    }

    public void setCryptoFile(File cryptoFile) {
        this.cryptoFile = cryptoFile;
    }

    public File getDownloadFile() {
        return downloadFile;
    }

    public void setDownloadFile(File downloadFile) {
        this.downloadFile = downloadFile;
    }
}
